-- GENERATED SPELL FOR [7th Legion Sentinel] --


function spell0_27162(pUnit, Event) --@Glaive Throw,n/a--
pUnit:FullCastSpellOnTarget(49481,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27162', 2267, 1)
end

function spell1_27162(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15547,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27162', 635, 1)
end

function spell2_27162(pUnit, Event) --@Shoot Magic Arrow,n/a--
pUnit:FullCastSpellOnTarget(48530,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27162', 590, 1)
end

function Sorts_27162(pUnit, Event)
local choix_sorts_27162 = math.random(0, 2)
if choix_sorts_27162 == 0 then
pUnit:RegisterEvent('spell0_27162', 1, 1)
end
if choix_sorts_27162 == 1 then
pUnit:RegisterEvent('spell1_27162', 1, 1)
end
if choix_sorts_27162 == 2 then
pUnit:RegisterEvent('spell2_27162', 1, 1)
end
end

function mob27162_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27162', math.random(1500, 3000), 1)
end

function mob27162_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27162_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27162_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27162, 1, 'mob27162_Action')
RegisterUnitEvent(27162, 2, 'mob27162_Leave')
RegisterUnitEvent(27162, 3, 'mob27162_Kill')
RegisterUnitEvent(27162, 4, 'mob27162_Die')
